import VueRouter from "vue-router"
const routes = [
    {
        path: '/auth',
        redirect: '/auth/login',
        name: '首页',
        hidden: true,
        type:true,
        component:()=>import('./components/auth/Login')
    }, {
        path: '/auth/login',
        name: 'Login',
        hidden: true,

        component: () => import('./components/auth/Login')
    },
    {
        path: '*',
        name: 'NotFound',
        hidden: true,
        component: () => import('./components/auth/NotFound')
    },
    {
        path: '/auth/index',
        name: '后台管理',
        iconClass: 'fa fa-home',
        redirect: '/auth/home',
        home:true,
        type:true,
        component: () => import('./components/auth/Index'),
        children: [
            {
                path: '/auth/home',
                name: '首页',
                iconClass: 'fa fa-eercast',
                component: () => import('./components/auth/business/DataStatistics')
            }
        ]
    },
    //一级路由
    {
        path: '/auth',
        name: '商家管理',
        type:true,
        iconClass: 'fa fa-users',
        component: () => import('./components/auth/Index'),
        children: [
            {
                path: '/auth/business',
                name: '商家入驻申请',
                iconClass: 'fa fa-list',
                component: () => import('./components/auth/business/MerchantSettlement')
            },
            {
                path: '/auth/info',
                name: '商家信息管理',
                iconClass: 'fa fa-list-alt',
                component: () => import('./components/auth/business/BusinessInformationManagement')
            },
            {
                path: '/auth/infos',
                name: '商品信息审核',
                iconClass: 'fa fa-list-alt',
                component: () => import('./components/auth/business/CommodityInformationManagement')
            },

        ]
    },
    {
        path: '/auth',
        name: '用户管理',
        type:true,
        iconClass: 'fa fa-bar-chart',
        component: () => import('./components/auth/Index'),
        children: [
            {
                path: '/auth/user',
                name: '用户信息管理',
                iconClass: 'fa fa-line-chart',
                component: () => import('./components/auth/user/UserInformatonManagement')
            },

        ]
    },
    {
        path: '/auth',
        name: '订单管理',
        iconClass: 'fa fa-bar-chart',
        type:true,
        component: () => import('./components/auth/Index'),
        children: [
            {
                path: '/auth/order',
                name: '订单信息查询',
                iconClass: 'fa fa-list-alt',
                component: () => import('./components/auth/order/OrderInformationManagement')
            }

        ]
    },
    {
        path: '/auth',
        name: '举报管理',
        iconClass: 'fa fa-bar-chart',
        type:true,
        component: () => import('./components/auth/Index'),
        children: [
            {
                path: '/auth/report',
                name: '举报信息查询',
                iconClass: 'fa fa-list-alt',
                component: () => import('./components/auth/report/ReportingInformation')
            }

        ]
    },
    {
        path: '/bussiness',
        redirect: '/bussiness/login',
        name: '首页',
        hidden: true,
        component:()=>import('./components/bussiness/Login')
    }, {
        path: '/bussiness/login',
        name: 'Login',
        hidden: true,
        component: () => import('./components/bussiness/Login')
    },

    //一级路由
    {
        path: '/bussiness',
        name: '商品管理',
        iconClass: 'fa fa-users',
        type:false,
        component: () => import('./components/bussiness/Index'),
        children: [
            {
                path: '/bussiness/infos',
                name: '商品信息查询',
                iconClass: 'fa fa-list-alt',
                component: () => import('./components/bussiness/business/CommodityInformationManagement')
            },

        ]
    },

    {
        path: '/bussiness/index',
        name: '库存管理',
        iconClass: 'fa fa-home',
        redirect: '/bussiness/home',
        type:false,
        home:true,
        component: () => import('./components/bussiness/Index'),
        children: [
            {
                path: '/bussiness/home',
                name: '商品库存管理',
                iconClass: 'fa fa-eercast',
                component: () => import('./components/bussiness/business/DataStatistics')
            }
        ]
    },
    // {
    //     path: '/flowerMarket/home',
    //     component: () => import('./components/flowerMarket/index/Home'),
    // },
    // {
    //     path: '/flowerMarket/Goods',
    //     component: () => import('./components/flowerMarket/index/GoodsList'),
    // },
    {
        path: '/flowerMarket/Index',
        redirect: '/flowerMarket/home',
        meta: {
            title: '登录',
        },
        component: () => import('./components/flowerMarket/Index'),
        children: [
            {
                path: '/flowerMarket/home',
                meta: {
                    title: '登录',
                },
                component: () => import('./components/flowerMarket/index/Home'),
            },
            {
                path: '/flowerMarket/goods',
                component: () => import('./components/flowerMarket/index/GoodsList'),
            },
            {
                path: '/flowerMarket/details',
                component: () => import('./components/flowerMarket/index/ProductDetails'),
            },
        ]
    },
    {
        path: '/flowerMarket/login',
        component: () => import('./components/flowerMarket/Login')
    },
    {
        path: '/flowerMarket/register',
        component: () => import('./components/flowerMarket/Register')
    },
    {
        path: '/flowerMarket/shopcar',
        component: () => import('./components/flowerMarket/index/ShopCar'),
    },
]

const router = new VueRouter({
    mode:'history',
    routes
})

export  default router;
